package com.ch01.ex18;


import java.util.ArrayDeque;
import java.util.Deque;

/**
 * Created by zc on 16-1-17.
 */
public class Main {

    public static void main(String[] args){
        Deque<Event> deque = new ArrayDeque<>();
        WriterTask task = new WriterTask(deque);
        for(int i=0; i<3; i++){
            Thread thread = new Thread(task);
            thread.start();
        }

        ClearTask clearTask = new ClearTask(deque);
        clearTask.start();
    }
}
